<?php
header('content-type:text/html; charset=utf-8');
session_start();
@$id=$_REQUEST['id'];
@$name=$_REQUEST['name'];
@$shou=$_REQUEST['shou'];

$pdo=new PDO('mysql:dbname=ton;charset=utf8','root');

$s=$pdo->prepare('update user set name=:name,shou=:shou where id=:id');
if($s->execute(array('name'=>$name,'shou'=>$shou,'id'=>$id))){
	header('content-type:text/html; charset=utf-8');
	header('Refresh:2;url=/th2.php');
	print_r("<h3>保存成功</h3>");
}else{
	header('Refresh:2;url=/bian.php');
	print_r("<h3>保存失败</h3>");
}